package W1108;

public class JiaoChe extends QiChe {
	private String xing;

	public JiaoChe() {
	}

	public JiaoChe(String chenum, String logo, int rent, String xing) {
		super(chenum, logo, rent);
		this.xing = xing;

	}

	public String getXing() {
		return xing;
	}

	public void setXing(String xing) {
		this.xing = xing;
	}

	public double calMoney(int day) {

		if (day > 150) {
			return this.getRent() * day * 0.7;
		}

		if (day > 30) {
			return this.getRent() * day * 0.8;
		}
		if (day > 7) {
			return this.getRent() * day * 0.9;
		}
		return this.getRent() * day;

	}


}
